﻿<UserControl x:Class="CoolCodePFM.UI.ControlPanel"
   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"          
             xmlns:cc="clr-namespace:CoolCode.Controls;assembly=CoolCode.Controls" >  
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid Background="#dfe8f6"   >
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"></RowDefinition>
                <RowDefinition Height="Auto"></RowDefinition>
                <RowDefinition Height="*"></RowDefinition>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <Grid Grid.ColumnSpan="2" Height="35" Style="{StaticResource grdHeader}">
                <Grid >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="300"></ColumnDefinition>
                        <ColumnDefinition Width="*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <Border CornerRadius="3" Height="33" BorderBrush="#8db2e3" Margin="8,0,0,0" BorderThickness="1,1,1,1" HorizontalAlignment="Left" >
                        <TextBlock x:Name="HeaderTitle" Margin="8,1,1,1" VerticalAlignment="Top"  FontSize="20" Foreground="Bisque">Title</TextBlock>
                    </Border>
                    <!--Banners-->
                    <Border Grid.Column="2" CornerRadius="3" Height="33" BorderBrush="#8db2e3" Margin="2,0,8,0" BorderThickness="1,1,1,1"  HorizontalAlignment="Right" >
                        <HyperlinkButton NavigateUri="http://www.qsh.eu/" TargetName="_blank" Margin="5,0,0,0"   Height="31" HorizontalAlignment="Right" 
                                         ToolTipService.ToolTip="ASP.NET Webhosting - Quantasoft Web Hosting" >
                            <HyperlinkButton.Content>
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Margin="2" FontSize="9">ADS</TextBlock>
                                    <!--<Image x:Name="imgBanner"  Source="/Images/banner.png" HorizontalAlignment="Center" />-->
                                </StackPanel>
                            </HyperlinkButton.Content>
                        </HyperlinkButton>
                    </Border>
                </Grid>
            </Grid>
            <Grid Grid.Row="2" Grid.Column="0" Margin="5">
                <Border x:Name="leftPanel" Width="200" BorderBrush="#99bbe8" BorderThickness="1">
                    <Grid  x:Name="leftGrid">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="*"></RowDefinition>
                        </Grid.RowDefinitions>
                        <Grid Height="26" Grid.Row="0" Style="{StaticResource grdHeader}">
                            <TextBlock Margin="6" Foreground="Bisque">Menu Panel</TextBlock>
                            <TextBlock Margin="6">Menu Panel</TextBlock>
                            <Image x:Name="expand" Source="Images/leftShow_icon.png" Stretch="None" Margin="3" HorizontalAlignment="Right" Opacity="0"></Image>
                            <Image x:Name="collapse" Source="Images/leftHide_icon.png" Stretch="None" Margin="3" HorizontalAlignment="Right" Opacity="1" Cursor="Hand"></Image>
                        </Grid>
                        <Border Height="1" Grid.Row="1" Background="#99bbe8" />
                        <Grid x:Name="MenuPanel" Grid.Row="2" />
                    </Grid>
                </Border>
            </Grid>
            <Grid Grid.Row="2" Grid.Column="1" Margin="5">
                <Border x:Name="rightPanel" BorderBrush="#99bbe8" BorderThickness="1">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="Auto"></RowDefinition>
                            <RowDefinition Height="*"></RowDefinition>
                        </Grid.RowDefinitions>
                        <Grid Height="26" Grid.Row="0" Style="{StaticResource grdHeader}">
                            <TextBlock x:Name="lblUserInfo" Margin="6" Foreground="Bisque"></TextBlock>
                        </Grid>
                        <Border Height="1" Grid.Row="1" Background="#99bbe8" />
                        <ScrollViewer Grid.Row="2"  VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" BorderThickness="0">
                            <Grid  x:Name="rightContent" />
                        </ScrollViewer>
                    </Grid>
                </Border>
            </Grid>
        </Grid>
        <Grid x:Name="dialogGrid">
        </Grid>
        <Grid x:Name="loadingGrid">
            <!--<cc:Loading x:Name="loading" Visibility="Collapsed"/>-->
        </Grid>
    </Grid>
    <UserControl.Resources>
        <Storyboard x:Name="hideMenu">
            <DoubleAnimation Storyboard.TargetName="leftPanel" Storyboard.TargetProperty="Width" To="26" Duration="0:0:0.3"></DoubleAnimation>
            <DoubleAnimation Storyboard.TargetName="collapse" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.1"></DoubleAnimation>
            <DoubleAnimation Storyboard.TargetName="expand" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.5"></DoubleAnimation>
            <DoubleAnimation Storyboard.TargetName="MenuPanel" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.2"></DoubleAnimation>
        </Storyboard>
        <Storyboard x:Name="showMenu">
            <DoubleAnimation Storyboard.TargetName="leftPanel" Storyboard.TargetProperty="Width" To="170" Duration="0:0:0.3"></DoubleAnimation>
            <DoubleAnimation Storyboard.TargetName="collapse" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.5"></DoubleAnimation>
            <DoubleAnimation Storyboard.TargetName="expand" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.1"></DoubleAnimation>
            <DoubleAnimation Storyboard.TargetName="MenuPanel" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.2"></DoubleAnimation>
        </Storyboard>
    </UserControl.Resources>
</UserControl>
